﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;
using agsXMPP.protocol.client;

namespace Mammoth.Converters
{
    public class PresenceToColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            var data = (PresenceType)value;
            switch (data)
            {
                case PresenceType.available:
                    return Colors.Green;
                case PresenceType.invisible:
                    return Colors.Gray;
                case PresenceType.unavailable:
                    return Colors.Red;
                default:
                    return Colors.Green;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
